package day04.lambda;

import java.util.Random;

public class Lian01 {
    public static void main(String[] args) {
        uysy(new Add() {
            @Override
            public int Bdd() {
                Random r = new Random();
                int num = r.nextInt(10) + 1;
                return num;
            }
        });
        uysy(() -> {
            Random r = new Random();
            int num = r.nextInt(10) + 1;
            return num;
        });
    }

    public static void uysy(Add add) {
        int a = add.Bdd();
        System.out.println(a);
    }
}

interface Add {
    int Bdd();
}